Optimal. Leaf size=266 \[ \frac{5 a^3 (4 c-3 d) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{4 f (c-d)^{3/2} (c+d)^{9/2}}+\frac{5 a^3 (4 c-3 d) (c+4 d) \tan (e+f x)}{24 d f (c-d) (c+d)^4 (c+d \sec (e+f x))}-\frac{5 a^3 (4 c-3 d) \tan (e+f x)}{24 d f (c+d)^3 (c+d \sec (e+f x))^2}-\frac{d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f \left (c^2-d^2\right ) (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) \tan (e+f x) (a \sec (e+f x)+a)^2}{12 f (c-d) (c+d)^2 (c+d \sec (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33683, antiderivative size = 327, normalized size of antiderivative = 1.23, number of steps used = 7, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {3987, 96, 94, 93, 205} \[ -\frac{5 a^4 (4 c-3 d) \tan (e+f x) \tan ^{-1}\left (\frac{\sqrt{c+d} \sqrt{a \sec (e+f x)+a}}{\sqrt{c-d} \sqrt{a-a \sec (e+f x)}}\right )}{4 f (c-d)^{3/2} (c+d)^{9/2} \sqrt{a-a \sec (e+f x)} \sqrt{a \sec (e+f x)+a}}+\frac{5 a^3 (4 c-3 d) \tan (e+f x)}{8 f (c-d) (c+d)^4 (c+d \sec (e+f x))}+\frac{5 (4 c-3 d) \tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right )}{24 f (c-d) (c+d)^3 (c+d \sec (e+f x))^2}-\frac{d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f \left (c^2-d^2\right ) (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) \tan (e+f x) (a \sec (e+f x)+a)^2}{12 f (c-d) (c+d)^2 (c+d \sec (e+f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3987
Rule 96
Rule 94
Rule 93
Rule 205
Rubi steps
\begin{align*} \int \frac{\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx &=-\frac{\left (a^2 \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{(a+a x)^{5/2}}{\sqrt{a-a x} (c+d x)^5} \, dx,x,\sec (e+f x)\right )}{f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}-\frac{\left (a^2 (4 c-3 d) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{(a+a x)^{5/2}}{\sqrt{a-a x} (c+d x)^4} \, dx,x,\sec (e+f x)\right )}{4 \left (c^2-d^2\right ) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}-\frac{\left (5 a^3 (4 c-3 d) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{(a+a x)^{3/2}}{\sqrt{a-a x} (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{12 (c+d) \left (c^2-d^2\right ) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}-\frac{\left (5 a^4 (4 c-3 d) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{\sqrt{a+a x}}{\sqrt{a-a x} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{8 (c+d)^2 \left (c^2-d^2\right ) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{5 a^3 (4 c-3 d) \tan (e+f x)}{8 (c-d) (c+d)^4 f (c+d \sec (e+f x))}-\frac{\left (5 a^5 (4 c-3 d) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a-a x} \sqrt{a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{8 (c+d)^3 \left (c^2-d^2\right ) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{5 a^3 (4 c-3 d) \tan (e+f x)}{8 (c-d) (c+d)^4 f (c+d \sec (e+f x))}-\frac{\left (5 a^5 (4 c-3 d) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{a c-a d-(-a c-a d) x^2} \, dx,x,\frac{\sqrt{a+a \sec (e+f x)}}{\sqrt{a-a \sec (e+f x)}}\right )}{4 (c+d)^3 \left (c^2-d^2\right ) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{5 a^4 (4 c-3 d) \tan ^{-1}\left (\frac{\sqrt{c+d} \sqrt{a+a \sec (e+f x)}}{\sqrt{c-d} \sqrt{a-a \sec (e+f x)}}\right ) \tan (e+f x)}{4 (c-d)^{3/2} (c+d)^{9/2} f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}-\frac{d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac{a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{5 a^3 (4 c-3 d) \tan (e+f x)}{8 (c-d) (c+d)^4 f (c+d \sec (e+f x))}\\ \end{align*}
Mathematica [A] time = 9.66236, size = 274, normalized size = 1.03 \[ \frac{a^3 \left (-\frac{\sin (e+f x) \left (37 c^2 d^2 \cos (3 (e+f x))+\left (-577 c^2 d^2-84 c^3 d-296 c^4+984 c d^3+198 d^4\right ) \cos (e+f x)+\left (384 c^2 d^2-470 c^3 d-72 c^4+200 c d^3+48 d^4\right ) \cos (2 (e+f x))+336 c^2 d^2+36 c^3 d \cos (3 (e+f x))-478 c^3 d-88 c^4 \cos (3 (e+f x))-72 c^4+24 c d^3 \cos (3 (e+f x))+28 c d^3+6 d^4 \cos (3 (e+f x))+336 d^4\right )}{(c \cos (e+f x)+d)^4}-\frac{120 (4 c-3 d) \tanh ^{-1}\left (\frac{(d-c) \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{\sqrt{c^2-d^2}}\right )}{96 f (c-d) (c+d)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.156, size = 303, normalized size = 1.1 \begin{align*} 16\,{\frac{{a}^{3}}{f} \left ({\frac{1}{ \left ( \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}c- \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}d-c-d \right ) ^{4}} \left ( -{\frac{ \left ( 20\,c-15\,d \right ) \left ({c}^{2}-2\,cd+{d}^{2} \right ) \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{7}}{64\,{c}^{4}+256\,{c}^{3}d+384\,{c}^{2}{d}^{2}+256\,c{d}^{3}+64\,{d}^{4}}}+{\frac{ \left ( 55\,c-55\,d \right ) \left ( 4\,c-3\,d \right ) \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{5}}{192\,{c}^{3}+576\,{c}^{2}d+576\,{d}^{2}c+192\,{d}^{3}}}-{\frac{ \left ( 292\,c-219\,d \right ) \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{3}}{192\,{c}^{2}+384\,cd+192\,{d}^{2}}}+{\frac{ \left ( 44\,c-49\,d \right ) \tan \left ( 1/2\,fx+e/2 \right ) }{ \left ( 64\,c+64\,d \right ) \left ( c-d \right ) }} \right ) }+{\frac{20\,c-15\,d}{ \left ( 64\,{c}^{5}+192\,{c}^{4}d+128\,{c}^{3}{d}^{2}-128\,{c}^{2}{d}^{3}-192\,c{d}^{4}-64\,{d}^{5} \right ) \sqrt{ \left ( c+d \right ) \left ( c-d \right ) }}{\it Artanh} \left ({\frac{\tan \left ( 1/2\,fx+e/2 \right ) \left ( c-d \right ) }{\sqrt{ \left ( c+d \right ) \left ( c-d \right ) }}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.804176, size = 3699, normalized size = 13.91 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a^{3} \left (\int \frac{\sec{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac{3 \sec ^{2}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac{3 \sec ^{3}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac{\sec ^{4}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.53497, size = 845, normalized size = 3.18 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]